package cn.edu.nit.sys.service.impl;

import cn.edu.nit.sys.entity.SysInfo;
import cn.edu.nit.sys.mapper.SysInfoMapper;
import cn.edu.nit.sys.service.SysInfoService;
import cn.edu.nit.sys.utils.R;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author xiaobai
 * @Date 2022/8/31 14:21
 * @Version 1.0.0
 */
@Service
public class SysInfoServiceImpl extends ServiceImpl<SysInfoMapper, SysInfo> implements SysInfoService {

    @Override
    public R getCpuRate() {
        List<SysInfo> cpuRate = baseMapper.getCpuRate();
        return R.ok(cpuRate);
    }

    @Override
    public R getNet() {
        List<SysInfo> net = baseMapper.getNet();
        return R.ok(net);
    }
}
